/**
 * Created by liu on 2018/3/27.
 */

import axios from '../../../api/api';
import { post } from '../../../api/myAxios';
import { getListData } from  '../../../utils/page';

export const getCommunityPostReturns = (_this) => {
    getListData(communityPostReturns, _this);
};

export const communityPostReturns = params => {
    return axios.get(`/api/community-post-return/list`, params)
        .then(communityPostReturns => {
            return communityPostReturns.data
        })
};
export const create = params => {
    let param = {
        url:'/api/community-post-return/add',
        data: params
    };
    return post(param).then(data => data)
};

export const remove = params => {
    let param = {
        url:'/api/community-post-return/delete',
        data: {id:params}
    };
    return post(param)
};